<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div>
    <el-form ref="form" :model="pro_tech" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 引用检测标准 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="引用标准文件" prop="">
              {{pro_tech.tech_fileid}}
              <el-button @click="popSelectionStandardFile('','tech_fileid')" type="success" size="mini"><i class="fa fa-edit"></i>选择</el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <el-button @click="t_t('')" type='success' size="mini"><i class='fa fa-check'></i>保存</el-button>
    </el-form>
    <el-dialog :visible.sync="SelectionStandardFileVisible" append-to-body>
      <SelectionStandardFile v-if="SelectionStandardFileVisible" ref="SelectionStandardFile" :popparams="popparams"> </SelectionStandardFile>
    </el-dialog>
  </div>
</template>
<script>
  import request from '@/utils/request'
  import SelectionStandardFile from "@/views/mes/product/SelectionStandardFile";
  export default {
    name: 'ReferenceTestCriteria',
    components: {
      SelectionStandardFile,
    },
    props: ['popparams'],
    data() {
      return {
        SelectionStandardFileVisible: false,
        SelectionStandardFileValue: null,
        SelectionStandardFileDesc: null,
        vueparams: this.getVUEParams(""),
        pro_tech: {
          tech_fileid: null,
        },
        loading: false,
        rules: {}
      }
    },
    created() {},
    updated() {},
    mounted() {},
    methods: {
      referenceTestCriteriaSubmit(_params) {
        request({
          method: 'post',
          url: '/xcapi/VUEAction/mes/product/TechnologyAction/referenceTestCriteriaSubmit?' + _params + this.vueparams,
          data: this.postData()
        }).then(data => {
          this.$router.replace("/redirect" + this.$route.fullPath);
          this.msgSuccess(data.msg);
        })
      },
      popSelectionStandardFile(desc, value) {
        this.SelectionStandardFileVisible = true;
        this.SelectionStandardFileDesc = desc;
        this.SelectionStandardFileValue = value;
      },
      closeSelectionStandardFile(value, desc) {
        this.SelectionStandardFileVisible = false;
        this.$set(this.pro_tech, this.SelectionStandardFileDesc, desc);
        this.$set(this.pro_tech, this.SelectionStandardFileValue, value);
      },
    },
  }
</script>
